package com.example.chat2.common;


import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;

@Data
public class Result {
    private Integer i;
    private String message;
    private Object o ;
    public Result(int i, String message, Object o) {
        this.i=i;
        this.message=message;
        this.o= o;

    }

    public  static    Result     OK(String message , Object users){

        return   new Result(200,message,users);
    }


    public  static    Result     FAIL (String message){
        return   new Result(500,message,null);
    }



}
